package com.java3_13;

//枚举类
public class MyEnum {
    private final String name;
    private final int month;

    private MyEnum(String name, int month) {
        this.name = name;
        this.month = month;
    }

    public static final MyEnum SPRING = new MyEnum("春天",345);
    public static final MyEnum SUMMER = new MyEnum("夏天",678);
    public static final MyEnum AUTUMN = new MyEnum("秋天",91011);
    public static final MyEnum WINTER = new MyEnum("冬天",1212);

    public String getName() {
        return name;
    }

    public int getMonth() {
        return month;
    }

    @Override
    public String toString() {
        return "MyEnum{" +
                "name='" + name + '\'' +
                ", month=" + month +
                '}';
    }
}
